[SUBJECT]
Description=Calculate monthly interest payment
ImageIndex=-1
Folder=Mathematics


[HEAD_TEXT]
;<!-- Cut-N-Paste JavaScript from ISN Toolbox 
;     Copyright 1996, Infohiway, Inc.  Restricted use is hereby
;     granted (commercial and personal OK) so long as this code
;     is not *directly* sold and the copyright notice is buried
;     somewhere deep in your HTML document.  A link to our site
;     http://www.infohiway.com is always appreciated of course,
;     but is absolutely and positively not necessary. ;-)   -->
;<script language="JavaScript">
;<!--Hide JavaScript from Java-Impaired Browsers
;function test_it(entry) {
; if (entry.value && entry.value.length!=0) {
;  entry.value=""+ eval(entry.value);
;  }
; computeForm(entry.form);
; }
;
;function computeForm(form) {
; if ((!form.months.value || form.months.value.length==0) ||
;    (!form.rate.value || form.rate.value.length==0) ||
;    (!form.financed.value || form.financed.value.length==0)) {
;   return;
;   }
; if (!alrt_msg(form.months,1,480,"Your Number of Payments") ||
;    !alrt_msg(form.rate,.001,99,"Your Interest Rate") ||
;    !alrt_msg(form.financed,100,10000000,"Your Principal Amount")) {
;   form.payment.value="A value out of range - Click Reset";
;   return;
;    }
; var i=form.rate.value;
; ffv=0;
; ffv+=form.financed.value;
; fmv=0;
; fmv+=form.months.value;
; if (i > 1.0) {
; // Hack to mostly correct floating point/binary conversion error
;  i=(i/100.0)+.00001;
;  var fmt="";
;  fmt+=i;
;  fmt=fmt.substring(0,6);
;  form.rate.value=fmt;
;  }
; i/=12;
; var isn=1;
; for (var j=0;j<form.months.value;j++)
;  isn=isn*(1+i);
;  form.payment.value=(form.financed.value*isn*i)/(isn-1);
;  fpv=0;
;  fpv+=form.payment.value;
;  fmt="";
;  var add=9;
;  fmt+=form.payment.value;
;  for (var i=0;i<fmt.length;i++) {
;   if (fmt.charAt(i)==".") {
;    add=i+3;
;    i=fmt.length;
;    }
;   }
;  fmt=fmt.substring(0,add);
;  fcalc=((fmv*fpv)-ffv);
;  var fmtb="";
;  add=9;
;  fmtb+=fcalc;
;  for (var i=0;i<fmtb.length;i++) {
;   if (fmtb.charAt(i)==".") {
;    add=i+3;
;    i=fmtb.length;
;    }
;   }
;  fmtb=fmtb.substring(0,add);
;  form.payment.value="   $"+fmt+"              $"+fmtb;
; }
;function reset_it(form) {
; form.months.value="";
; form.rate.value="";
; form.financed.value="";
; form.payment.value="";
; }
;
;function alrt_msg(entry,low,high,myprompt) {
; myprompt="You couldn't know. "+myprompt 
; +" entry has unacceptable stuff: "+entry.value;
; var scratch=entry.value;
; for (var i=0;i<scratch.length;i++) {
;  var letter=scratch.substring(i,i+1);
;  if ((letter<"0" || "9"<letter) && letter!='.') {
;   alert(myprompt);
;   return false;
;   }
;    }
; var errtst=parseFloat(scratch);
; if (errtst<low || high<errtst) {
;  alert("I'm sorry. "+myprompt+ " is not in the range"
;  +" from "+low+" to "+high+"!");
;  return false;
;  }
; entry.value=scratch;
; return true;
; }
;//-->
;</SCRIPT>



[BODY_TEXT]
;<div align="center">
;<table width="484" border="2" summary="">
;<tr><td colspan="3"><br>
;If you have a Netscape® 2.0 Browser, you can use this handy 
;tool to learn just how much your monthly payment will be for a new 
;computer, a big screen TV or even a new house!
;<p>All you do is type the amount it will cost, what the interest 
;rate will be and how many months your loan will be for.  "Click" 
;Compute or simply click in the payment window to see how much it 
;will cost each month.<p></td></tr>
;</table>
;<form method="post">
;<table width="484" border="2" summary="">
;<tr>
;<td colspan="3" valign="top" align="center">
;  <b>`Caption`</b></td>
;<td valign="top" align="center"><b>See Your Payment Here</b></td>
;<td valign="top" align="center"><B>See Your Interest Cost  Here</b></td></tr>
;<tr>
;<td align="center">Number of<BR>Monthly<br>Payments</td>
;<td align="center">Simple<br>Interest<br>Rate</td>
;<td align="center">Principal<br>Amount<br>of Loan</td>
;<td align="center">Your<br>Monthly<br>Payment<br>Will Be</td>
;<td align="center">Your<br>Total<br>Interest Cost<br>Will Be</td>
;</tr>
;<tr>
;<td align="center">
;  <input type="text" name="months" SIZE="5" onChange="test_it(this)"> </td>
;<td align="center">
;  <input type="text" name="rate" SIZE="6" onChange="test_it(this)"></td>
;<td align="center">
;  $<input type="text" name="financed" SIZE="9" onChange="test_it(this)"></td>
;<td colspan="2" align="center">
;  <input type="text" name="payment" SIZE="40" onChange="test_it(this)"></td></tr>
;<tr>
;<td colspan="2" align="center">
;  <input type="reset" VALUE="Click Here to Reset" onClick="reset_it(this.form)"></td>
;<td colspan="3" align="center">
;  <input type="button" value="Click Here to Compute Payment and Cost" onClick="computeForm(this.form)"></td>
;</tr>
;</table>
;</FORM>
;</div>

[`Caption`]
Kind=S
Value=Simply Complete These Three Columns:


